From: Florian Müllner Date: Fri, 14 Feb 2014 23:32:45 +0000 (+0100) Subject: popupMenu: Make destroy() a bit more robust X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2745 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3e7e88cd5f55db389b5afe22a5ccf808ba4f4d03;p=gnome-shell.git popupMenu: Make destroy() a bit more robust Currently destroying a menu's actor and calling its destroy() method are subtly different - the latter will also result in the menu being removed from the corresponding menu manager. There is no good justification for that behavior, so make both actions behave the same. https://bugzilla.gnome.org/show_bug.cgi?id=724690 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 39b6a2ae1..bec38a03e 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -111,6 +111,7 @@ const PopupBaseMenuItem = new Lang.Class({ this.actor.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn)); this.actor.connect('key-focus-out', Lang.bind(this, this._onKeyFocusOut)); + this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); }, _getTopMenu: function() { @@ -192,6 +193,9 @@ const PopupBaseMenuItem = new Lang.Class({ destroy: function() { this.actor.destroy(); + }, + + _onDestroy: function() { this.emit('destroy'); },